/*
 * FreeSSM.h - Program main window
 *
 * Copyright (C) 2008-2010 Comer352l
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef FREESSM_H
#define FREESSM_H


#include <QWidget>
#include <QSettings>
#include <QLocale>
#include "Languages.h"
#include "AbstractDiagInterface.h"
#include "SerialPassThroughDiagInterface.h"
#include "J2534DiagInterface.h"
#include "SSMP2communication.h"
#include "libFSSM.h"
#include "EngineDialog.h"
#include "TransmissionDialog.h"
#include "About.h"
#include "ui_FreeSSM.h"
#include "qcarpcdialog.h"

namespace Ui {
    class FreeSSM;
}


class FreeSSM : public QWidget
{
	Q_OBJECT

private:
        Ui::FreeSSM *ui;
        AbstractDiagInterface::interface_type _iface_type;
	QString _iface_filename;
	QString _language;
	QTranslator *_qt_translator;
	QTranslator *_translator;
	QAction *_dump_action;
	bool _dumping;
        QSettings *settings;
	AbstractDiagInterface * initInterface();
        myMessage *errmessage;
	void closeEvent(QCloseEvent *event);

public:
        FreeSSM(QWidget *parent = 0);
	~FreeSSM();
 
private slots:
        void on_engine_pushButton_released();
        void on_transmission_pushButton_released();
        void on_about_pushButton_released();
        void on_exit_pushButton_released();
	void retranslate(QString newlanguage, QTranslator *newtranslator);
	void dumpCUdata();

};



#endif
